cmake_minimum_required(VERSION 3.10)
project(cloud)

# 设置 C++ 标准
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# 构建类型：默认 Debug（可通过 cmake -DCMAKE_BUILD_TYPE=Release .. 指定）
if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Debug)
endif()

# 设置C++调试编译选项
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -g -ggdb")

add_executable(server 
    src/server/server.cc
    lib/bundle-master/bundle.cpp
)

target_include_directories(server PRIVATE 
    ${CMAKE_SOURCE_DIR}/lib/bundle-master
    ${CMAKE_SOURCE_DIR}/lib/cpp-httplib-master
)

target_link_libraries(server PRIVATE 
    pthread
    stdc++fs
    jsoncpp
)
